CREATE TABLE [dbo].[CardPayments]
(
[CardTxnId] [bigint] NOT NULL IDENTITY(1, 1),
[TxnDateTime] [datetime] NOT NULL,
[CardType] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ResultCode] [int] NOT NULL,
[StatusCode] [bigint] NOT NULL,
[ErrorCode] [int] NULL,
[GatewayChannel] [int] NOT NULL,
[ResponseMessage] [nvarchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CardHolderName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CardNumber] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CardExpiryDate] [int] NOT NULL,
[TxnAmount] [money] NOT NULL,
[PnRefId] [nchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CustRefId] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CustomerId] [bigint] NOT NULL,
[PaymentTxnId] [bigint] NOT NULL,
[CreditCardKey] [int] NULL
) ON [PRIMARY]
GO
